package com.sunyard.auth.controller.convert;

import com.sunyard.auth.controller.vo.SmAuthUserVO;
import com.sunyard.auth.model.AuthModel;
import com.sunyard.auth.service.bo.SmAuthUserBO;

/**
 * @program auth
 * @description
 * @author raoinyx@163.com
 * @create 2020-07-18 00:23
 */
public class SmAuthUserConvert {

	public static SmAuthUserBO toBO(SmAuthUserVO smAuthUserVO) {
		if (smAuthUserVO == null) {
			return null;
		}
		SmAuthUserBO smAuthUserBO = new SmAuthUserBO();
		smAuthUserBO.setUserId(smAuthUserVO.getUserId());
		smAuthUserBO.setUserName(smAuthUserVO.getUserName());
		smAuthUserBO.setPassword(smAuthUserVO.getPassword());
		smAuthUserBO.setRealName(smAuthUserVO.getRealName());
		smAuthUserBO.setTelephone(smAuthUserVO.getTelephone());
		smAuthUserBO.setEmail(smAuthUserVO.getEmail());
		smAuthUserBO.setStatus(smAuthUserVO.getStatus());
		smAuthUserBO.setOrgcode(smAuthUserVO.getOrgcode());
		return smAuthUserBO;
	}

	public static AuthModel toVO(SmAuthUserBO smAuthUserBO) {
		if (smAuthUserBO == null) {
			return null;
		}
		AuthModel authModel = new AuthModel();
		authModel.setUserId(smAuthUserBO.getUserId());
		authModel.setUserName(smAuthUserBO.getUserName());
		authModel.setPassword(smAuthUserBO.getPassword());
		authModel.setRealName(smAuthUserBO.getRealName());
		authModel.setTelephone(smAuthUserBO.getTelephone());
		authModel.setEmail(smAuthUserBO.getEmail());
		authModel.setStatus(smAuthUserBO.getStatus());
		authModel.setOrgcode(smAuthUserBO.getOrgcode());
		return authModel;
	}

}
